﻿$(function(){
    //$('#dance').html(Math.random());
    init();
});
var Te = $.TeClan;
// 获取get值
Te.getId = function(){
    return $('#pres').attr('data');
}
// GoJs-http://gojs.net/latest/index.html
//  http://gojs.net/latest/samples/index.html
function init() {
    var $$ = go.GraphObject.make;
    var myDiagram =$$(go.Diagram, "node_dance",{
        initialContentAlignment: go.Spot.Center, // center Diagram contents
        "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo
        initialAutoScale: go.Diagram.Uniform,
        nodeSelectionAdornmentTemplate:
            $$(go.Adornment, "Auto",
                { layerName: "Grid" },  // the predefined layer that is behind everything else
                $$(go.Shape, "Circle", { fill: "yellow", stroke: null }),
                $$(go.Placeholder)
            )
    });

    //var M = $$(go.Model);
    //var M = $$(go.GraphLinksModel);
    var M = $$(go.TreeModel);
    M.nodeDataArray = loadModel;
    myDiagram.model = M;
}
